package de.schlinke_marius.database;

import android.database.Cursor;
import android.database.sqlite.SQLiteException;

public interface HardwareTbl {
	
	public static final String TABLE_NAME = "HARDWARE";
	
	public static final String COLUMN_ID = "_ID";
	
	public static final String COLUMN_HARDWARE_NAME = "HARDWARENAME";
	
	public static final String COLUMN_HARDWARE_TYPE = "HARDWARETYPE";
	
	public static final String COLUMNS [] = {	
											COLUMN_ID,
											COLUMN_HARDWARE_NAME,
											COLUMN_HARDWARE_TYPE};
	
	public static final String CREATE_TABLE_HARDWARE = "CREATE TABLE IF NOT EXISTS " + TABLE_NAME + " ("
												+ COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL," 
												+ COLUMN_HARDWARE_NAME + " text, "
												+ COLUMN_HARDWARE_TYPE + " text );";
	
	
	public static final String INSERT_INTO_HARDWARE  = "INSERT INTO " + TABLE_NAME + "(" + COLUMN_ID + "," +  COLUMN_HARDWARE_NAME + "," + COLUMN_HARDWARE_TYPE + ") values (?,?,?)";

	public long insertIntoHardware(int id, String hardwareName, String hardwareType) throws SQLiteException;

	public Cursor getHardware(int id) throws SQLiteException;
}
